package ClassAndObject.Demo1103Object;
/*
对于基本数据类型中的Boolean值，Getter方法一定写成isXxxx形式，setXxxx规则不变
*/
public class Student {
    private String name;
    private int age;
    //下面是get set 方法的特例
    private boolean male;//是不是爷们儿

    public void setMale(boolean b) {
        this.male = b;
    }

    public boolean isMale() {
        return male;
    }

    public void setName(String str) {
        this.name = str;
    }

    public String getName() {
        return name;
    }

    public void setAge(int num) {
        this.age = num;
    }
    public int getAge() {
        return age;
    }
}
